package io.renren.modules.mqtt;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 项目启动执行
 *
 * @author lhb
 * @date 2023/8/4
 */
@Component
@Order(value = 1)
public class MqttClientStart implements ApplicationRunner {
    @Autowired
    private MqttPushClient client;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        client.connect();
    }
}
